package cn.b.sky.mes.pp.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.DateTimeFormat.ISO;

import cn.b.sky.common.model.ImeCommon;

/**
 * 
 * <strong>Title : ProductOrder.java<br></strong>
 * <strong>Package : cn.b.sky.mes.pp.model<br></strong>
 * <strong>Description : </strong>产品订单<br> 
 * <strong>Create on : 2016-1-15 下午1:44:19<br></strong>
 * <p>
 * @author lidapeng<br>
 * @version <strong>v1.0.0</strong><br>
 * <br>
 * <strong>修改历史:</strong><br>
 * 修改人 | 修改日期 | 修改描述<br>
 * -------------------------------------------<br>
 * <br>
 * <br>
 */
public class ProductOrder extends ImeCommon implements Serializable {

  /** 
  * @Fields serialVersionUID : 
  * @creator     :lidapeng
  */
  private static final long serialVersionUID = 1L;

  /**
   * 订单编号
   */
  private String productOrderNum;

  /**
   * 新增订单类型字段
   */
  private String orderTypeCode;

  /**
   * 订单类型描述
   */
  private String orderTypeText;

  /**
   * 物料编号
   */
  private String materialCode;

  /**
   * 物料描述
   * 页面展示使用
   */
  private String materialText;

  /**
   * 计划数量
   */
  private Double plannedQuantity;

  /**
   * 已分解数量
   */
  private Double decomposedQuantity;

  /**
   * 当前分解数量，页面显示使用
   */
  private Double decompositionQuantity;

  /**
   * 完工数量
   */
  private Double completedQuantity;

  /**
   * 报废数量
   */
  private Float scrappedQuantity;

  /**
   * 返修数量
   */
  private Float repairQuantity;

  /**
   * 订单状态
   */
  private String statuseCode;

  /**
   * 订单状态描述
   */
  private String statuseText;

  /**
   * 需求日期
   */
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private Date requirementDate;

  /**
   * 生产批号
   */
  private String productionlotNum;

  /**
   * 计划开始时间
   */
  @DateTimeFormat(iso = ISO.DATE_TIME, pattern = "yyyy-MM-dd HH:mm:ss")
  private Date plannedstartDateTime;

  /**
   * 计划结束时间
   */
  @DateTimeFormat(iso = ISO.DATE_TIME, pattern = "yyyy-MM-dd HH:mm:ss")
  private Date plannedendDateTime;

  /**
   * 实际开始时间
   */
  @DateTimeFormat(iso = ISO.DATE_TIME, pattern = "yyyy-MM-dd HH:mm:ss")
  private Date actualstartDateTime;

  /**
   * 实际结束时间
   */
  @DateTimeFormat(iso = ISO.DATE_TIME, pattern = "yyyy-MM-dd HH:mm:ss")
  private Date actualendDateTime;

  /**
   * 客户
   */
  private String customer;

  /**
   * 客户订单
   */
  private String customerOrder;

  /**
   * 优先级
   */
  private Integer priority;

  List<ProductionOrder> productionOrder = new ArrayList<ProductionOrder>();

  public String getProductOrderNum() {
    return productOrderNum;
  }

  public void setProductOrderNum(String productOrderNum) {
    this.productOrderNum = productOrderNum;
  }

  public String getOrderTypeCode() {
    return orderTypeCode;
  }

  public void setOrderTypeCode(String orderTypeCode) {
    this.orderTypeCode = orderTypeCode;
  }

  public String getOrderTypeText() {
    return orderTypeText;
  }

  public void setOrderTypeText(String orderTypeText) {
    this.orderTypeText = orderTypeText;
  }

  public String getMaterialCode() {
    return materialCode;
  }

  public void setMaterialCode(String materialCode) {
    this.materialCode = materialCode;
  }

  public String getMaterialText() {
    return materialText;
  }

  public void setMaterialText(String materialText) {
    this.materialText = materialText;
  }

  public Double getPlannedQuantity() {
    return plannedQuantity;
  }

  public void setPlannedQuantity(Double plannedQuantity) {
    this.plannedQuantity = plannedQuantity;
  }

  public Double getDecomposedQuantity() {
    return decomposedQuantity == null ? 0 : decomposedQuantity;
  }

  public void setDecomposedQuantity(Double decomposedQuantity) {
    this.decomposedQuantity = decomposedQuantity;
  }

  public Double getDecompositionQuantity() {
    return decompositionQuantity == null ? 0 : decompositionQuantity;
  }

  public void setDecompositionQuantity(Double decompositionQuantity) {
    this.decompositionQuantity = decompositionQuantity;
  }

  public Double getCompletedQuantity() {
    return completedQuantity;
  }

  public void setCompletedQuantity(Double completedQuantity) {
    this.completedQuantity = completedQuantity;
  }

  public Float getScrappedQuantity() {
    return scrappedQuantity;
  }

  public void setScrappedQuantity(Float scrappedQuantity) {
    this.scrappedQuantity = scrappedQuantity;
  }

  public Float getRepairQuantity() {
    return repairQuantity;
  }

  public void setRepairQuantity(Float repairQuantity) {
    this.repairQuantity = repairQuantity;
  }

  public String getStatuseCode() {
    return statuseCode;
  }

  public void setStatuseCode(String statuseCode) {
    this.statuseCode = statuseCode;
  }

  public String getStatuseText() {
    return statuseText;
  }

  public void setStatuseText(String statuseText) {
    this.statuseText = statuseText;
  }

  public Date getRequirementDate() {
    return requirementDate;
  }

  public void setRequirementDate(Date requirementDate) {
    this.requirementDate = requirementDate;
  }

  public String getProductionlotNum() {
    return productionlotNum;
  }

  public void setProductionlotNum(String productionlotNum) {
    this.productionlotNum = productionlotNum;
  }

  public Date getPlannedstartDateTime() {
    return plannedstartDateTime;
  }

  public void setPlannedstartDateTime(Date plannedstartDateTime) {
    this.plannedstartDateTime = plannedstartDateTime;
  }

  public Date getPlannedendDateTime() {
    return plannedendDateTime;
  }

  public void setPlannedendDateTime(Date plannedendDateTime) {
    this.plannedendDateTime = plannedendDateTime;
  }

  public Date getActualstartDateTime() {
    return actualstartDateTime;
  }

  public void setActualstartDateTime(Date actualstartDateTime) {
    this.actualstartDateTime = actualstartDateTime;
  }

  public Date getActualendDateTime() {
    return actualendDateTime;
  }

  public void setActualendDateTime(Date actualendDateTime) {
    this.actualendDateTime = actualendDateTime;
  }

  public List<ProductionOrder> getProductionOrder() {
    return productionOrder;
  }

  public void setProductionOrder(List<ProductionOrder> productionOrder) {
    this.productionOrder = productionOrder;
  }

  public String getCustomer() {
    return customer;
  }

  public void setCustomer(String customer) {
    this.customer = customer;
  }

  public String getCustomerOrder() {
    return customerOrder;
  }

  public void setCustomerOrder(String customerOrder) {
    this.customerOrder = customerOrder;
  }

  public Integer getPriority() {
    return priority;
  }

  public void setPriority(Integer priority) {
    this.priority = priority;
  }

}
